Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Triforce Hunt #720

Merged
merged 8 commits into from
Apr 23, 2024
Merged

Conversation

HylianFreddy
Copy link
Collaborator

@HylianFreddy HylianFreddy commented Mar 3, 2024

This feature is the same as the homonymous one from OoTR. When enabled, a configurable number of Triforce pieces will be added to the pool, and the game will end when the required amount is obtained.

Ganon's Boss Key is removed from the game, and the Ganon location (considered as the "win condition") is logically accessible from the world root when all the Triforce pieces have been collected. This means that, like in OoTR, the logic will always expect all pieces to be required, regardless of the "Required Pieces" setting.

When the Triforce is complete, the game will be saved and the ending sequence will play. The next time the file is opened, Ganon's Boss Key will be given immediately.

Settings changes

Because the piece count settings have options from 1 to 200, I have added a "fast scrolling" triggered by holding A while pressing left and right. To do this I also had to merge together the functions to scroll the options into one ScrollOptionIndex, I hope that's not bad style.

For the Ganon BK setting, I have added an unselectable "Triforce" option that is only showed when Triforce Hunt is enabled and the setting is locked. I know this is a bit hacky but I couldn't find a better way to show the setting as locked and avoid checking for triforce hunt every time the GanonBK setting is used for anything.

Text

I have added a system to add custom control codes to the game text. I made it to show how many Triforce pieces the player has when they find a new one. This will also allow to create more dynamic text in the future if it's ever needed.
I have also removed some of the existing quick text patches and reimplemented them in the new C functions.

Potential changes / things to do

  • When playing in multiplayer, I think only the player that gets the final piece will warp to the credits. I'm not sure if this should be changed. This has been fixed so that all players will warp to the credits.

Preview video

triforce-hunt.mp4

Preview 3DSX builds

Build for this branch (commit 721be0e):
OoT3D_Randomizer_721be0eb.zip

Build including all my other features, as visible from commit 43063df:
OoT3D_Randomizer_43063df2.zip

Build for this branch (commit 96bd9e0):
OoT3D_Randomizer_96bd9e06.zip

Build including all my other features, as visible from commit 39e4665:
OoT3D_Randomizer_39e4665b.zip

@HylianFreddy HylianFreddy marked this pull request as draft March 3, 2024 10:24
@Kewlan
Copy link
Collaborator

Kewlan commented Mar 3, 2024

For multiplayer, maybe the behaviour should change to something like this:

  • Whether it's singleplayer or multiplayer, it checks for when you have gone from having less than required to required triforce pieces or higher (to account for two get one at once), then wait to teleport to credits.
  • The teleport happens as soon as the player can move freely again. This is so it doesn't mess anything up for other players that are in the middle of something important, for example, after setting a chest opened bit but before the item has actually been acquired.

@HylianFreddy
Copy link
Collaborator Author

I have implemented the credits warp for multiplayer. For the player that gets the final piece, the warp will start when the text ends. If instead the final triforce pieces are received from the network, the warp will start when the game/player isn't busy.

@HylianFreddy HylianFreddy marked this pull request as ready for review March 14, 2024 22:38
@Kewlan
Copy link
Collaborator

Kewlan commented Mar 16, 2024

Can you add TRIFORCE_PIECE to ignored playthrough hint items here, so gossip stones don't get filled with triforce pieces:

std::vector<ItemKey> ignoredItems = {
// Small Collectibles
GOLD_SKULLTULA_TOKEN, PIECE_OF_HEART, HEART_CONTAINER, TREASURE_GAME_HEART,
// Small Keys
FOREST_TEMPLE_SMALL_KEY, FIRE_TEMPLE_SMALL_KEY, WATER_TEMPLE_SMALL_KEY, SPIRIT_TEMPLE_SMALL_KEY,
SHADOW_TEMPLE_SMALL_KEY, BOTTOM_OF_THE_WELL_SMALL_KEY, GERUDO_TRAINING_GROUNDS_SMALL_KEY,
GERUDO_FORTRESS_SMALL_KEY, GANONS_CASTLE_SMALL_KEY
};

I think they can always be ignored because you can still tell based on the given hints where you should and don't need to search for pieces.

@HylianFreddy
Copy link
Collaborator Author

Can you add TRIFORCE_PIECE to ignored playthrough hint items here, so gossip stones don't get filled with triforce pieces:

std::vector<ItemKey> ignoredItems = {
// Small Collectibles
GOLD_SKULLTULA_TOKEN, PIECE_OF_HEART, HEART_CONTAINER, TREASURE_GAME_HEART,
// Small Keys
FOREST_TEMPLE_SMALL_KEY, FIRE_TEMPLE_SMALL_KEY, WATER_TEMPLE_SMALL_KEY, SPIRIT_TEMPLE_SMALL_KEY,
SHADOW_TEMPLE_SMALL_KEY, BOTTOM_OF_THE_WELL_SMALL_KEY, GERUDO_TRAINING_GROUNDS_SMALL_KEY,
GERUDO_FORTRESS_SMALL_KEY, GANONS_CASTLE_SMALL_KEY
};

I think they can always be ignored because you can still tell based on the given hints where you should and don't need to search for pieces.

Done!

@HylianFreddy HylianFreddy merged commit ca479cd into gamestabled:main Apr 23, 2024
2 checks passed
@HylianFreddy HylianFreddy deleted the triforce-hunt branch April 23, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants